#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<assert.h>

void* my_memmove(void* des, const void* src, size_t num)
{
	assert(des && src);
	void* ret = des;
	if (des < src)
	{
		while (num--)
		{
			*((char*)des) = *((char*)src);
			des = (char*)des + 1;
			src = (char*)src + 1;
		}
	}
	else
	{
		while (num--)
		{
			*((char*)des + num) = *((char*)src + num);
		}
	}
	return ret;
}

int main()
{
	char str[] = "Memmove Can Be Very Useful......";
	my_memmove(str + 20, str + 15, 11);
	puts(str);
	return 0;
}